import request from '@/utils/request'

// 获取子商户列表
export async function getSubShopList(params: any) {
  return request('/api/backend/getSubShopList', {
    method: 'GET',
    params
  })
}

// 更改子商户状态
export async function updateStatus(data: any) {
  return request('/api/platform/updateStatus', {
    method: 'POST',
    data
  })
}

// 获取子商户详情
export async function getMerchantInfo(params: any) {
  return request('/api/platform/merchantInfo', {
    method: 'GET',
    params
  })
}

// 创建子商户
export async function createSubShop(data: any) {
  return request('/api/backend/createSubShop', {
    method: 'POST',
    data
  })
}

// 更新子商户
export async function updateSubShop(data: any) {
  return request('/api/backend/updateSubShop', {
    method: 'POST',
    data
  })
}

// 开关店铺
export async function setDisplay(params: any) {
  return request('/api/backend/setDisplay', {
    method: 'GET',
    params
  })
}
